1. Field of the Invention
The present invention relates to an AV data recording apparatus and method, suitable for recording/reproducing AV (audio-video) data such as a digital image.
2. Description of the Related Art
In recent years, optical disks are being used as recording media for recording digital images including animation, due to their increased density. Optical disks are applied in a wide range; specifically, they are applied to peripheral equipment of computers, video players for use at home, etc. Furthermore, it is expected that optical disks will be used as recording media, in place of tape media in the future.
In order to handle data for common use in such a wide range of applications, data generally is managed as a logical unit (i.e., file). As an example of such a file management method, there is a file system using a format based on the UDF (Universal Disk Format) standard.
The UDF standard is prescribed so as to ensure medium compatibility among various kinds of computer OSes (Operating Systems). The UDF standard also is used in consumer equipment such as DVD-Video players. Furthermore, it is expected that the UDF standard will be supported over a wider platform in the future.
Hereinafter, the structure of a file system (hereinafter, referred to as a “UDF file system”) using the UDF standard will be described with reference to the drawings. FIG. 35 shows an example of a structure of an apparatus for recording/reproducing data adopting a conventional AV data recording method.
In FIG. 35, reference numeral 101 denotes a disk (e.g., a magneto-optical disk), and 102 denotes a recording medium driving section. When the disk 101 is, for example, a magneto-optical disk, the recording medium driving section 102 may be composed of a spindle motor, or the like.
Reference numeral 103 denotes a recording/reproducing section, which is composed of an optical pickup, a magnetic head, a servo circuit, a modulation/demodulation circuit, and the like, when the disk 101 is, for example, a magneto-optical disk. Reference numeral 104 denotes a memory section, which stores data temporarily during recording/reproduction.
Reference numeral 105 denotes a disk drive unit, which is composed of the disk 101, the recording medium driving section 102, the recording/reproducing section 103, and the memory section 104.
Reference numeral 106 denotes an AV signal processing section, which subjects an AV input signal (that is input through a CCD camera, for example) to processing such as MPEG compression or subjects AV data read from the disk 101 to processing such as MPEG decoding, and outputs the results to a monitor or the like.
Furthermore, reference numeral 107 denotes a system control section, which controls the AV signal processing section 106 and the disk drive unit 105.
When data is recorded in an apparatus for recording/reproducing data thus constructed, an AV signal input to the AV signal processing section 106 is subjected to image compression in accordance with the MPEG system or the like, and transferred to the memory section 104 under the control of the system control section 107.
Next, the system control section 107 operates the recording medium driving section 102 and the recording/reproducing section 103 to record data in the memory section 104 onto the disk 101.
For reproduction of data, the system control section 107 operates the recording medium driving section 102 and the recording/reproducing section 103 to transfer data recorded on the disk 101 to the memory section 104.
Then, the data in the memory section 104 is read under the control of the system control section 107, and is output from the AV signal processing section 106 as an AV signal.
Next, an example of a structure of the UDF file system that is a conventional file management method will be described with reference to the drawings. FIG. 36 shows the structure in a volume space of the UDF formed on the disk 101.
In FIG. 36, in order to handle the disk 101 as a logical volume, the disk 101 is divided into units called sectors, and the sectors are assigned logical sector numbers (LSNs) from 0 (Zero) to a last logical number (Last LSN). In a leading portion and a trailing portion of the volume space, a volume structure is recorded, respectively. Furthermore, a partition space is allocated between the volume structures. In the partition space, file structure information and a file (i.e., user data) are recorded.
In the partition space, logical block numbers (LBNs) are allocated in a range of 0 (Zero) to a last logical block number (Last LBN) from a leading sector on a sector basis. FIG. 37 shows a structure of the partition space when a directory structure shown in FIG. 38 is recorded on the disk 101.
As shown in FIG. 38, a directory Dir1 is present under a root directory, and File1_1 and File1_2 are present under the directory Dir1. In this case, in FIG. 37, a space bitmap descriptor is recorded in LBN=0 to 79.
The space bitmap descriptor has a space bitmap showing whether or not each logical block is allocatable. Each bit of the space bitmap corresponds to a respective logical block. When a bit value is “1”, its corresponding logical block is unallocated, and when a bit value is “0”, its corresponding logical block is allocated.
In LBN=80, a file set descriptor is recorded. In the file set descriptor, positional information of a file entry of the root directory is recorded. The file entry will be described in detail later.
In LBN=81, a terminating descriptor is recorded. The terminating descriptor represents an end of a file set descriptor string.
In LBN=82, a file entry of the root directory is recorded. The file entry is used for storing various pieces of attribute information specific to each file, information on the recorded position and size of each file, and the like, and managing each file as a group of extents. The extent will be described in detail later.
FIG. 39 shows a structure of the file entry. In a descriptor tag field, information is recorded for identifying various kinds of descriptors such as a space bitmap descriptor, a file set descriptor, and a file entry in the partition space. In the case of the file entry, “261” is described. In an ICB (Information Control Block) tag field, attribute information on the file entry itself is recorded. An extended attribute field is used for describing attribute information other than that prescribed in an attribute information field in the file entry. In an allocation descriptor field, the required number of allocation descriptors are recorded for managing a region of continuous logical blocks as one extent.
FIG. 40 shows a structure of the allocation descriptor. In the allocation descriptor, an extent is represented by an extent length and an extent position.
FIG. 41 shows interpretation of the 2 most significant bits of the extent length included in the allocation descriptor. An allocated state and a recorded state of the extent are represented by the value of the 2 most significant bits. The value “0” represents an extent recorded and allocated, and file data is recorded therein. The value “1” represents an extent not recorded but allocated, and its region is allocated to a particular file/directory; however, no data is recorded therein. The value “2” represents an extent not recorded and not allocated, and no data is recorded therein. The value “3” represents the extent that is the next extent of the allocation descriptors. In the allocation descriptor field of the file entry, a plurality of allocation descriptors can be recorded, and collection of extents managed by these allocation descriptors form one file. The extents forming a file are called a main data stream, in which user data is stored.
In a directory, a name of a file included in the directory, and positional information on a file entry thereof are recorded. In the UDF, a directory also is a kind of a file. Referring to FIG. 37, directories are recorded in LBN=83 and LBN=85.
FIG. 42 shows an example of a structure of a directory file recorded in LBN=85. The directory file is composed of a plurality of file identifier descriptors, and each file identifier descriptor has information on each file included in the directory. The main information associated with each file identifier descriptor includes a name of a file to which the file identifier descriptor corresponds and positional information on a file entry thereof FIG. 43 shows an example of the logical structure of a directory/file in file management information in accordance with the UDF standard.
In FIG. 43, the file set descriptor is recorded at a predetermined position in the partition space as a part of file management information. In the file set descriptor, a recorded position of the file entry of the root directory file is stored. In the file identifier descriptor of the root directory file, a recorded position of the file entry of the directory Dir1 is stored. In a file under the directory Dir1, a plurality of file identifier descriptors are present, and file names and recorded positions of file entries of FILE1_1 and FILE1_2 are stored, respectively.
Furthermore, according to the UDF, an extended file entry can be used in place of the above-mentioned file entry. FIG. 44 shows an example of a structure of an extended file entry. In the UDF standard, in a descriptor tag field of the extended file entry, “266” is described.
The extended file entry is different from the file entry, in that the extended file entry has a stream directory ICB field. In the stream directory ICB, positional information on a file entry for describing a special directory called a stream directory is stored.
FIG. 45 shows an example of a structure of the stream directory. The stream directory also is a kind of a directory file, and is composed of a plurality of file identifier descriptors in the same way as in a general directory file.
The stream directory file is different from a general directory file, in that a file identifier descriptor in the stream directory is related to a special file called a named data stream.
Furthermore, in the stream directory, a main data stream is referred to as a parent entry, in place of a parent directory.
In the case of the named data stream, the collection of extents managed by allocation descriptors in an extended file entry also forms one data stream.
Accordingly, a file managed by an extended file entry is composed of one main data stream, or one main data stream and at least one named data stream.
FIG. 46 shows an example of a directory/file logical structure when an extended file entry is used in accordance with the UDF standard. In FIG. 46, the relationship among a file set descriptor, a root directory, a directory Dir1, and files FILE1_1 and FILE_2 is the same as that shown in FIG. 43, except that an extended file entry is used in place of a file entry.
Referring to FIG. 44, in the stream directory ICB field of the extended file entry, a recorded position of a file entry in the stream directory is stored.
In a file under the stream directory, a plurality of file identifier descriptors are present, and names and recorded positions of extended file entries of named_stream_1 and named_stream_2 are stored in the respective file identifier descriptors.
Referring to FIG. 46, in the directory Dir1, three data streams: a directory file (main data stream), and named_stream_1 and named_stream_2 (named data streams) form one file.
Hereinafter, an operation of an apparatus for recording/reproducing data will be described, in which a desired file is read from a disk having a structure in accordance with the above-mentioned UDF file system.
An operation of obtaining a recorded position of an intended file in a hierarchical structure as shown in FIG. 43 will be described. It is assumed that a file FILE1_1 is the intended one.
First, the content of a root directory file is read. More specifically, a position of a file entry of the root directory is obtained by referring to a file set descriptor. Then, an allocation descriptor is read from the file entry to obtain the position and length of an extent of the root directory file, and data of the root directory file are read. By scanning information on the root directory file thus obtained, a file identifier descriptor matched with an intended directory name Dir1 can be detected.
Then, the content of the intended directory file is read. More specifically, when a file identifier descriptor matched with an intended directory is detected, positional information of a file entry is obtained from the content of the file identifier descriptor, and the file entry is read. An allocation descriptor is read from the file entry regarding the intended directory to obtain the position and length of an extent recorded in the allocation descriptor, and data of the directory file are read.
Finally, in order to read an intended file, data in a file under the directory Dir1 are scanned to detect a file identifier descriptor matched with an intended file name FILE1_1. When a file identifier descriptor matched with the intended file name is detected, positional information of a file entry is obtained from the file identifier descriptor, and a file entry thereof is read. An allocation descriptor is read from the file entry to obtain the position and length of an extent recorded in the allocation descriptor, and data of the intended file FILE1_1 is read.
Next, an operation of an apparatus for recording/reproducing data will be described, in which data are recorded on a disk having a structure based on the UDF file system. Herein, the case will be described where FILE1_3 is further recorded in the directory Dir1 with respect to a disk having the partition space shown in FIG. 37.
First, a space bitmap is scanned, and an unallocated logical block with a bit “1” is obtained. Data of FILE1_3 is recorded as an extent in the unallocated logical block. When recording of the extent is completed, a file entry indicating FILE1_3 is recorded in the unallocated logical block.
At this time, positional information on the extent indicating FILE1_3 and the extent length are recorded in the file entry as a required number of allocation descriptors. A file identifier descriptor indicating FILE1_3 is recorded in a file of a directory Dir1 that is a parent directory of FILE1_3.
In the file identifier descriptor, a file name of FILE1_3 and positional information of the file entry thereof are recorded. A bit in the space bitmap corresponding to a sector that has been allocated by the above processing is set at “0” so as to be in an allocated state.
FIG. 47 shows a logical volume space obtained as a result of the above processing. The order of processing with respect to file management information is not particularly limited to the above example. The processing may be performed in a different order.
Hereinafter, an operation of an apparatus for recording/reproducing apparatus will be described in which a desired named data stream is read from a disk having a structure based on the UDF file system. Herein, an operation of obtaining a recorded position of an intended named data stream in a hierarchical structure as shown in FIG. 46 will be described. In FIG. 46, it is assumed that named_stream_1 is the intended data stream.
An operation of reading a file entry of a directory Dir1 that is a parent directory of the named data stream named_stream_1 is as described above.
A stream directory ICB is read from an extended file entry of the directory Dir1, and an extended file entry of a stream directory recorded therein is obtained.
Then, an allocation descriptor is read from the extended file entry to obtain the position and length of an extent of the stream directory, and data of the stream directory file is read.
Information on the obtained stream directory is scanned, whereby a file identifier descriptor matched with the name of the intended named data stream (i.e., named_stream_1) can be detected.
Positional information of an extended file entry is obtained from the content of the file identifier descriptor, and the extended file entry is read.
An allocation descriptor is read from the extended file entry regarding the named data stream to obtain the position and length of an extent recorded therein, and data of an intended named data stream (named_stream—1) is read.
A named data stream also is recorded in the same way as in a file, except that a file identifier descriptor for storing a recorded position of an extended file entry of the named data stream is recorded in a stream directory file.
The order of processing with respect to the named data stream is not particularly limited to the above example, and the processing may be performed in a different order.
However, the above-mentioned file management method using the UDF has the following problem. More specifically, according to the UDF, a directory is recorded as a file in a partition space, and a file entry also is recorded in the partition space. Therefore, the directory file and the file entry may be distributed on a disk. Thus, in the case where it is attempted to read all the files under a certain directory, when a directory file and a file entry are distributed, seeking occurs often with respect to a disk.
For example, referring to FIG. 47, file entries of FILE1_1, FILE_2, and FILE1_3 are distributed; therefore, seeking cannot be avoided for reading them. When a file to be reproduced is the one which requires real time reproduction, such as an AV file, reproduction of the file may be difficult due to the occurrence of seeking.
Similarly, in the case where real time recording is required as in an AV file and the like, when a file entry is recorded after AV data is recorded, seeking occurs with respect to a disk, and recording of AV data during this time stops. This also applies to the case where a large amount of still image files and the like subjected to JPEG compression are recorded and browsed through.
It is conceivable to reduce seeking with respect to a disk by reading all the file management information to a memory and performing on-memory processing, upon activation of an apparatus. Even in this case, seeking occurs a number times, which prolongs an activation time. Furthermore, a required memory capacity cannot be expected previously; therefore, it is difficult to construct a system in which a calculator resource is disposed efficiently.